//
//  UITapGestureRecognizer+point.m
//  Test
//
//  Created by xueshan1 on 2019/6/5.
//  Copyright © 2019 xueshan1. All rights reserved.
//

#import "UITapGestureRecognizer+point.h"
#import "NSObject+swizzle.h"
@implementation UITapGestureRecognizer (point)

+ (void)load{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        [self swizzleInstanceMethod:@selector(initWithTarget:action:) newSelector:@selector(my_initWithTarget:action:) class:[self class]];
        [self swizzleInstanceMethod:@selector(addTarget:action:) newSelector:@selector(my_addTarget:action:) class:[self class]];
    });
}
- (instancetype)my_initWithTarget:(id)target action:(SEL)action{
    UITapGestureRecognizer *tap = [self my_initWithTarget:target action:action];
    [tap my_addTarget:target action:action];
    return tap;
}
- (void)my_addTarget:(id)target action:(SEL)action{
    NSLog(@"打点 sel:%@ target:%@",NSStringFromSelector(action),target);

    [self my_addTarget:target action:action];
}

@end
